1. Field of the Invention
The present invention relates to a printing apparatus, and to a control method and information recording medium for the same. More specifically, the present invention relates to a printing apparatus wherein a process can be selected to be run after recovering from an off-line status, to a method for controlling the printing apparatus, and to an information recording medium for recording the control method.
2. Description of the Related Art
Today, many common cash registers and desktop calculators are equipped with a printer. These printers are typically used for printing sales receipts, delivery records, rental receipts, and other types of documents containing a certain type of information and format on a single- or multiple-part form.
One type of form used in these printers has perforations defining form units of a specific length in which the particular information is printed. Another type is simply roll paper on which information is printed and the form is then automatically cut or manually torn to an appropriate length. The paper unit printed with a specific set of information is referred to below as a receipt. It should be further noted that some receipts may be the same length as one another, while others will differ in length.
FIG. 1 is a block diagram of the basic configuration of a printer 101 according to the present invention but is discussed at this point with reference to aspects of the related art. Print data or control data is sent to the printer 101 from a host 102, which is typically a computer or other data processing device, and is received through interface 103. Received data is temporarily stored in receive buffer 104, which is commonly a ring buffer.
The host 102 may be integrated with the printer in a cash register or desktop calculator in which the printer is incorporated, or it may be a stand-alone general-purpose or specialized computer separate from the printer. Thus, the host 102 could be any device capable of sending data to the printer.
When the host 102 is a computer, a program for controlling the printer 101 typically runs on the host 102. The printer control program run on the host can be easily updated and distributed to users by recording it to a floppy disk, hard disk, CD-ROM, or other computer-readable medium 112. It could also be distributed electronically via a telecommunications network 114.
A CPU 105 in the printer 101 sequentially reads data from the receive buffer 104. If print data indicating text to be printed is read from the receive buffer 104, the CPU 105 reads the font information from a font read only memory (ROM) 106, and buffers the information to be printed to a print buffer 107.
When the CPU 105 reads control commands from the receive buffer 104, it controls the printer 101 according to the received commands. For example, if the control commands are printer definitions (settings), the CPU 105 updates the corresponding printer definitions (settings) stored in storage device 108, which may be a random access memory (RAM). These printer definitions (settings) are referenced when the font information is expanded into the print buffer 107, and include, for example, print ratio settings for enlarged or reduced printing, text attributes such as bold, inverted, and underline, the line feed distance, and the definition of external fonts.
When the print buffer 107 becomes full, or when a line return command or other command initializing printing is detected, the CPU 105 controls the print head 109 or form feed mechanism 110 based on the content of the print buffer 107 to print the content of the print buffer 107 on paper. When one line of printing is completed, the paper is advanced, and the print buffer 107 is cleared.
Printer operation as described above is controlled by the CPU 105 using a control program stored in program ROM 111 or other storage medium. When the printer 101 power is turned on, the CPU 105 loads this program from program ROM 111 and begins operation.
To enable this printer-side control program to be updated as needed, program ROM 111 may be replaced by SRAM, flash ROM, or other type of non-volatile rewritable memory. Alternatively, the printer control program could be stored on floppy disk, hard disk, CD-ROM, or other data storage medium separate from the printer 101, similarly to the control program on the host side.
Processing by the printer may also be interrupted for a variety of reasons. When this occurs, the printer is said to be "off-line." When the problem causing the printer to go off-line is resolved and the printer starts processing again, it is said to "resume operation."
Some possible causes for a printer to go off-line are described below.
(a) No paper (depleted paper supply).
Using roll paper or continuous perforated forms makes it possible to print a large number of forms and replenish the paper supply less frequently. There is, however, still a finite number of forms that can be printed before the paper supply must be replenished. Printer operation can typically be resumed once the paper supply is replenished.
(b) Paper jam occurs during printing.
This condition occurs when the paper is not advanced normally, or jams with a paper fold obstructing print head (carriage) movement. Printer operation can resume once the paper jam is removed.
(c) Overheated print head, resulting from printing continuously for an extended period of time.
When the print head overheats, print head damage can occur and print quality deteriorates. The printer therefore enters an off-line state until the print head temperature drops, and then resumes operation.
(d) The user manually sets the printer off-line.
This can happen, for example, when the user presses an off-line switch on the operating panel of the printer, or opens the printer cover.
It should be noted that none of these off-line conditions necessarily occurs between forms, i.e., after printing of one form or sheet has been completed and before printing of the next form or sheet is started. It is therefore common for the printer to go off-line while in the middle of printing information on a single form.
Current printers typically resume operations with a predetermined operation of reprinting the whole page during which the problem occurred. However, in some printing operations, it is not always preferable to reprint the whole page. For example, in a printing operation in which a sales receipt, coupon and warranty are sequentially printed in one transaction, it is preferable to reprint necessary pages in accordance with how many pages are jammed. Moreover, if an amount of print data usually sent to a printer exceeds the capacity of a receive buffer in the printer, it is preferable to cancel the print job in case of paper jamming.
There is therefore a need for the ability to change the "resume operation", i.e., the process or function performed by the printer when it resumes operation, in accordance with what printing operation the host is directing the printer to perform.